<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			#box {
				width: 200px;
				height: 200px;
				background-color: red;
			}
		</style>
	</head>
	<body>
		<div id="box"></div>
		<script type="text/javascript">
			// IE: attachEvent()  detachEvent()
			// IE10以下浏览器可以使用
			var box = document.getElementById('box');
			box.attachEvent('onclick',function (){
				this.innerHTML += '1';
			})
		</script>
	</body>
</html>
